<html>
<head>
  <title>系统管理——环境变量设定</title>
  <meta name="layout" content="common_header"/>
  <link rel="stylesheet" type="text/css" href="${resource(dir: 'css', file: 'jquery.validate.css', absolute: true)}"/>
  <script type="text/javascript" src="${resource(dir: 'js/jquery', file: 'jquery.metadata.pack.js', absolute: true)}"></script>
  <script type="text/javascript" src="${resource(dir: 'js/jquery', file: 'jquery.validate.min.js', absolute: true)}"></script>
  <script type="text/javascript" src="${resource(dir: 'js/jquery', file: 'jquery.form.min.js', absolute: true)}"></script>
  <script type="text/javascript" src="${resource(dir: 'js/jquery', file: 'jquery.blockUI.min.js', absolute: true)}"></script>

  <script type="text/javascript" src="${resource(dir: 'js/jquery', file: 'jquery.validate.custom.js', absolute: true)}"></script>
  <script type="text/javascript" src="${resource(dir: 'js/jquery', file: 'common.custom.js', absolute: true)}"></script>
  <script type="text/javascript">
    function save(id) {
      //jQuery("#id").val(id)
      jQuery("#submitForm").ajaxSubmit({
        success: function(response) {
          if (response == "1") {
            alert("修改成功")
          } else {
            alert("修改出错")
          }
        }
      });
    }
  </script>
</head>
<body>
<div id="man_zone">
  <form id="submitForm" name="submitForm" action="${createLink(controller: "scaffold", action: 'save', absolute: true)}" method="post">
    <input type="hidden" name="property" value="${bo?.class.simpleName}"/>
    <input type="hidden" name="id" value="${bo?.id}"/>

    <table width="99%" border="0" align="center" cellpadding="3" cellspacing="1" class="table_style">
      <tr>
        <td align="center" colspan="4" class="center_title_1">
          <b>图片信息</b>
        </td>
      </tr>
      <tr>
        <td width="20%" class="left_title_1">文件名</td>
        <td width="30%" class="fillin">
          ${bo?.fileName}
        </td>
        <td width="20%" class="left_title_1">创建日期</td>
        <td width="30%" class="fillin">
          ${bo?.dateCreated}
        </td>
      </tr>
      <tr>
        <td class="left_title_1">类型</td>
        <td class="fillin">
          <select id="type" name="type">
            <option value="10" <g:if test="${bo?.type == '10'}"></g:if>>楼盘图片</option>
            <option value="20" <g:if test="${bo?.type == '20'}"></g:if>>房型图片</option>
            <option value="30" <g:if test="${bo?.type == '30'}"></g:if>>室内图片</option>
          </select>
        </td>
        <td class="left_title_1">图片描述</td>
        <td class="fillin">
          <input type="text" id="desc" name="description" value="${bo?.description}" class="{notEmpty:'图片描述',isDigits:true,byteMaxLength:255}"/>
        </td>
      </tr>
      <tr>
        <td align="center" colspan="4">
          <a id="doSave" href="javaScript:save()"><img src="${resource(dir: '/images/admin_ui/', file: 'save1.gif', absolute: true)}" alt="保存"/></a>
        </td>
      </tr>

      <tr>
        <td align="center" colspan="4">
          <img src="${resource(dir: '/upload/info_picture/', file: bo?.fileName, absolute: true)}" width="400" height="300">
        </td>
      </tr>
    </table>

  </form>
</div>
</body>
</html>
